/*
 * Copyright (c) 2010, 2011
 *	Open Source Technologies Ltd.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. Neither the name of the company nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COMPANY AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */
#include <stdlib.h>

#include "defs.h"
#include "name.h"
#include "keyword.h"

const name_t reserved_keyword_names[] =
{
	{ rk_addressing_mode, "ADDRESSING_MODE" },
	{ rk_align,           "ALIGN"           },
	{ rk_always,          "ALWAYS"          },
	{ rk_and,             "AND"             },
	{ rk_begin,           "BEGIN"           },
	{ rk_bind,            "BIND"            },
	{ rk_bit,             "BIT"             },
	{ rk_builtin,         "BUILTIN"         },
	{ rk_by,              "BY"              },
	{ rk_byte,            "BYTE"            },
	{ rk_case,            "CASE"            },
	{ rk_codecomment,     "CODECOMMENT"     },
	{ rk_compiletime,     "COMPILETIME"     },
	{ rk_decr,            "DECR"            },
	{ rk_decra,           "DECRA"           },
	{ rk_decru,           "DECRU"           },
	{ rk_do,              "DO"              },
	{ rk_else,            "ELSE"            },
	{ rk_eludom,          "ELUDOM"          },
	{ rk_enable,          "ENABLE"          },
	{ rk_end,             "END"             },
	{ rk_eql,             "EQL"             },
	{ rk_eqla,            "EQLA"            },
	{ rk_eqlu,            "EQLU"            },
	{ rk_eqv,             "EQV"             },
	{ rk_exitloop,        "EXITLOOP"        },
	{ rk_external,        "EXTERNAL"        },
	{ rk_field,           "FIELD"           },
	{ rk_forward,         "FORWARD"         },
	{ rk_from,            "FROM"            },
	{ rk_geq,             "GEQ"             },
	{ rk_geqa,            "GEQA"            },
	{ rk_gequ,            "GEQU"            },
	{ rk_global,          "GLOBAL"          },
	{ rk_gtr,             "GTR"             },
	{ rk_gtra,            "GTRA"            },
	{ rk_gtru,            "GTRU"            },
	{ rk_if,              "IF"              },
	{ rk_incr,            "INCR"            },
	{ rk_incra,           "INCRA"           },
	{ rk_incru,           "INCRU"           },
	{ rk_initial,         "INITIAL"         },
	{ rk_inrange,         "INRANGE"         },
	{ rk_iopage,          "IOPAGE"          },
	{ rk_keywordmacro,    "KEYWORDMACRO"    },
	{ rk_label,           "LABEL"           },
	{ rk_leave,           "LEAVE"           },
	{ rk_leq,             "LEQ"             },
	{ rk_leqa,            "LEQA"            },
	{ rk_lequ,            "LEQU"            },
	{ rk_library,         "LIBRARY"         },
	{ rk_linkage,         "LINKAGE"         },
	{ rk_literal,         "LITERAL"         },
	{ rk_local,           "LOCAL"           },
	{ rk_long,            "LONG"            },
	{ rk_lss,             "LSS"             },
	{ rk_lssa,            "LSSA"            },
	{ rk_lssu,            "LSSU"            },
	{ rk_macro,           "MACRO"           },
	{ rk_map,             "MAP"             },
	{ rk_mod,             "MOD"             },
	{ rk_module,          "MODULE"          },
	{ rk_neq,             "NEQ"             },
	{ rk_neqa,            "NEQA"            },
	{ rk_nequ,            "NEQU"            },
	{ rk_not,             "NOT"             },
	{ rk_novalue,         "NOVALUE"         },
	{ rk_of,              "OF"              },
	{ rk_or,              "OR"              },
	{ rk_otherwise,       "OTHERWISE"       },
	{ rk_outrange,        "OUTRANGE"        },
	{ rk_own,             "OWN"             },
	{ rk_plit,            "PLIT"            },
	{ rk_preset,          "PRESET"          },
	{ rk_psect,           "PSECT"           },
	{ rk_quad,            "QUAD"            },
	{ rk_record,          "RECORD"          },
	{ rk_ref,             "REF"             },
	{ rk_register,        "REGISTER"        },
	{ rk_rep,             "REP"             },
	{ rk_require,         "REQUIRE"         },
	{ rk_return,          "RETURN"          },
	{ rk_routine,         "ROUTINE"         },
	{ rk_select,          "SELECT"          },
	{ rk_selecta,         "SELECTA"         },
	{ rk_selectone,       "SELECTONE"       },
	{ rk_selectonea,      "SELECTONEA"      },
	{ rk_selectoneu,      "SELECTONEU"      },
	{ rk_selectu,         "SELECTU"         },
	{ rk_set,             "SET"             },
	{ rk_show,            "SHOW"            },
	{ rk_signed,          "SIGNED"          },
	{ rk_stacklocal,      "STACKLOCAL"      },
	{ rk_structure,       "STRUCTURE"       },
	{ rk_switches,        "SWITCHES"        },
	{ rk_tes,             "TES"             },
	{ rk_then,            "THEN"            },
	{ rk_to,              "TO"              },
	{ rk_undeclare,       "UNDECLARE"       },
	{ rk_unsigned,        "UNSIGNED"        },
	{ rk_until,           "UNTIL"           },
	{ rk_uplit,           "UPLIT"           },
	{ rk_volatile,        "VOLATILE"        },
	{ rk_weak,            "WEAK"            },
	{ rk_while,           "WHILE"           },
	{ rk_with,            "WITH"            },
	{ rk_word,            "WORD"            },
	{ rk_xor,             "XOR"             },
	{ rk__allocation,     "%ALLOCATION"     },
	{ rk__ascic,          "%ASCIC"          },
	{ rk__ascid,          "%ASCID"          },
	{ rk__ascii,          "%ASCII"          },
	{ rk__asciz,          "%ASCIZ"          },
	{ rk__assign,         "%ASSIGN"         },
	{ rk__b,              "%B"              },
	{ rk__bliss,          "%BLISS"          },
	{ rk__bliss16,        "%BLISS16"        },
	{ rk__bliss32,        "%BLISS32"        },
	{ rk__bliss36,        "%BLISS36"        },
	{ rk__bliss64,        "%BLISS64"        },
	{ rk__bpaddr,         "%BPADDR"         },
	{ rk__bpunit,         "%BPUNIT"         },
	{ rk__bpval,          "%BPVAL"          },
	{ rk__c,              "%C"              },
	{ rk__char,           "%CHAR"           },
	{ rk__charcount,      "%CHARCOUNT"      },
	{ rk__count,          "%COUNT"          },
	{ rk__ctce,           "%CTCE"           },
	{ rk__d,              "%D"              },
	{ rk__decimal,        "%DECIMAL"        },
	{ rk__declared,       "%DECLARED"       },
	{ rk__e,              "%E"              },
	{ rk__else,           "%ELSE"           },
	{ rk__error,          "%ERROR"          },
	{ rk__errormacro,     "%ERRORMACRO"     },
	{ rk__exactstring,    "%EXACTSTRING"    },
	{ rk__exititeration,  "%EXITITERATION"  },
	{ rk__exitmacro,      "%EXITMACRO"      },
	{ rk__expand,         "%EXPAND"         },
	{ rk__explode,        "%EXPLODE"        },
	{ rk__fi,             "%FI"             },
	{ rk__fieldexpand,    "%FIELDEXPAND"    },
	{ rk__g,              "%G"              },
	{ rk__h,              "%H"              },
	{ rk__identical,      "%IDENTICAL"      },
	{ rk__if,             "%IF"             },
	{ rk__inform,         "%INFORM"         },
	{ rk__isstring,       "%ISSTRING"       },
	{ rk__length,         "%LENGTH"         },
	{ rk__ltce,           "%LTCE"           },
	{ rk__message,        "%MESSAGE"        },
	{ rk__name,           "%NAME"           },
	{ rk__nbits,          "%NBITS"          },
	{ rk__nbitsu,         "%NBITSU"         },
	{ rk__null,           "%NULL"           },
	{ rk__number,         "%NUMBER"         },
	{ rk__o,              "%O"              },
	{ rk__p,              "%P"              },
	{ rk__print,          "%PRINT"          },
	{ rk__quote,          "%QUOTE"          },
	{ rk__quotename,      "%QUOTENAME"      },
	{ rk__rad50_10,       "%RAD50_10"       },
	{ rk__rad50_11,       "%RAD50_11"       },
	{ rk__ref,            "%REF"            },
	{ rk__remaining,      "%REMAINING"      },
	{ rk__remove,         "%REMOVE"         },
	{ rk__require,        "%REQUIRE"        },
	{ rk__sbttl,          "%SBTTL"          },
	{ rk__sixbit,         "%SIXBIT"         },
	{ rk__size,           "%SIZE"           },
	{ rk__string,         "%STRING"         },
	{ rk__switches,       "%SWITCHES"       },
	{ rk__then,           "%THEN"           },
	{ rk__title,          "%TITLE"          },
	{ rk__unquote,        "%UNQUOTE"        },
	{ rk__upval,          "%UPVAL"          },
	{ rk__variant,        "%VARIANT"        },
	{ rk__warn,           "%WARN"           },
	{ rk__x,              "%X"              },
	{ -1,                 NULL              }
};

const name_t unreserved_keyword_names[] =
{
	{ uk_absolute,      "ABSOLUTE"      },
	{ uk_assembly,      "ASSEMBLY"      },
	{ uk_binary,        "BINARY"        },
	{ uk_bliss16,       "BLISS16"       },
	{ uk_bliss32,       "BLISS32"       },
	{ uk_bliss36,       "BLISS36"       },
	{ uk_bliss36c,      "BLISS36C"      },
	{ uk_bliss64,       "BLISS64"       },
	{ uk_call,          "CALL"          },
	{ uk_clearstack,    "CLEARSTACK"    },
	{ uk_code,          "CODE"          },
	{ uk_commentary,    "COMMENTARY"    },
	{ uk_concatenate,   "CONCATENATE"   },
	{ uk_debug,         "DEBUG"         },
	{ uk_emt,           "EMT"           },
	{ uk_entry,         "ENTRY"         },
	{ uk_environment,   "ENVIRONMENT"   },
	{ uk_errs,          "ERRS"          },
	{ uk_execute,       "EXECUTE"       },
	{ uk_expand,        "EXPAND"        },
	{ uk_extended,      "EXTENDED"      },
	{ uk_general,       "GENERAL"       },
	{ uk_ident,         "IDENT"         },
	{ uk_indirect,      "INDIRECT"      },
	{ uk_interrupt,     "INTERRUPT"     },
	{ uk_iot,           "IOT"           },
	{ uk_jsb,           "JSB"           },
	{ uk_jsr,           "JSR"           },
	{ uk_jsys,          "JSYS"          },
	{ uk_ka10,          "KA10"          },
	{ uk_kc10,          "KC10"          },
	{ uk_ki10,          "KI10"          },
	{ uk_kl10,          "KL10"          },
	{ uk_ks10,          "KS10"          },
	{ uk_language,      "LANGUAGE"      },
	{ uk_linkage_regs,  "LINKAGE_REGS"  },
	{ uk_list,          "LIST"          },
	{ uk_long_relative, "LONG_RELATIVE" },
	{ uk_lsi11,         "LSI11"         },
	{ uk_main,          "MAIN"          },
	{ uk_noassembly,    "NOASSEMBLY"    },
	{ uk_nobinary,      "NOBINARY"      },
	{ uk_nocode,        "NOCODE"        },
	{ uk_nocommentary,  "NOCOMMENTARY"  },
	{ uk_nodebug,       "NODEBUG"       },
	{ uk_nodefault,     "NODEFAULT"     },
	{ uk_noerrs,        "NOERRS"        },
	{ uk_noexecute,     "NOEXECUTE"     },
	{ uk_noexpand,      "NOEXPAND"      },
	{ uk_nolibrary,     "NOLIBRARY"     },
	{ uk_nonexternal,   "NONEXTERNAL"   },
	{ uk_noobject,      "NOOBJECT"      },
	{ uk_nooptimize,    "NOOPTIMIZE"    },
	{ uk_nopic,         "NOPIC"         },
	{ uk_nopreserve,    "NOPRESERVE"    },
	{ uk_noread,        "NOREAD"        },
	{ uk_norequire,     "NOREQUIRE"     },
	{ uk_nosafe,        "NOSAFE"        },
	{ uk_noshare,       "NOSHARE"       },
	{ uk_nosource,      "NOSOURCE"      },
	{ uk_nosymbolic,    "NOSYMBOLIC"    },
	{ uk_notrace,       "NOTRACE"       },
	{ uk_notused,       "NOTUSED"       },
	{ uk_nounames,      "NOUNAMES"      },
	{ uk_nowrite,       "NOWRITE"       },
	{ uk_nozip,         "NOZIP"         },
	{ uk_object,        "OBJECT"        },
	{ uk_optimize,      "OPTIMIZE"      },
	{ uk_optlevel,      "OPTLEVEL"      },
	{ uk_origin,        "ORIGIN"        },
	{ uk_ots,           "OTS"           },
	{ uk_ots_linkage,   "OTS_LINKAGE"   },
	{ uk_overlay,       "OVERLAY"       },
	{ uk_pic,           "PIC"           },
	{ uk_portal,        "PORTAL"        },
	{ uk_preserve,      "PRESERVE"      },
	{ uk_ps_interrupt,  "PS_INTERRUPT"  },
	{ uk_pushj,         "PUSHJ"         },
	{ uk_quad_relative, "QUAD_RELATIVE" },
	{ uk_read,          "READ"          },
	{ uk_relative,      "RELATIVE"      },
	{ uk_relocatable,   "RELOCATABLE"   },
	{ uk_rsx_ast,       "RSX_AST"       },
	{ uk_rtt,           "RTT"           },
	{ uk_safe,          "SAFE"          },
	{ uk_share,         "SHARE"         },
	{ uk_skip,          "SKIP"          },
	{ uk_source,        "SOURCE"        },
	{ uk_stack,         "STACK"         },
	{ uk_standard,      "STANDARD"      },
	{ uk_standard_ots,  "STANDARD_OTS"  },
	{ uk_symblolic,     "SYMBOLIC"      },
	{ uk_t11,           "T11"           },
	{ uk_tops10,        "TOPS10"        },
	{ uk_tops20,        "TOPS20"        },
	{ uk_trace,         "TRACE"         },
	{ uk_trap,          "TRAP"          },
	{ uk_unames,        "UNAMES"        },
	{ uk_valuecbit,     "VALUECBIT"     },
	{ uk_version,       "VERSION"       },
	{ uk_word_relative, "WORD_RELATIVE" },
	{ uk_write,         "WRITE"         },
	{ uk_zip,           "ZIP"           },
	{ -1,               NULL            }
};
